package org.goodsl.mdd.gwt.box.server;

import org.goodsl.mdd.BoxInfo;
import org.goodsl.mdd.SegInBox;
import org.goodsl.mdd.gwt.box.shared.BoxDesc;
import org.goodsl.mdd.gwt.box.shared.SegDesc;
import org.goodsl.mdd.gwt.box.shared.SegType;

public class BoxDescUtil {
	
	public static BoxDesc getBoxDesc(BoxInfo boxInfo){
		BoxDesc boxDesc = new BoxDesc();
        for(SegInBox segInBox : boxInfo){
        	boxDesc.segList.add(new SegDesc(
                    SegType.STRING,
                    segInBox.getSegName(),
                    segInBox.getSetting().getAlias()
            ));
        }		
       
        return boxDesc;	
	}

}
